<%--
  Created by IntelliJ IDEA.
  User: 今天要吃三碗饭
  Date: 2025/1/2
  Time: 20:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录界面</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .login-container {
            width: 300px;
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 4px;
        }
        h2 {
            text-align: center;
            margin-bottom: 20px;
        }
        form {
            display: flex;
            flex-direction: column;
        }
        label {
            margin-bottom: 5px;
        }
        input[type="text"],
        input[type="password"] {
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        input[type="submit"] {
            padding: 10px 20px;
            background-color: #5cb85c;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        input[type="submit"]:hover {
            background-color: #4cae4c;
        }
        .form-footer {
            text-align: center;
            margin-top: 10px;
        }
        .form-footer a {
            color: #5cb85c;
            text-decoration: none;
        }
    </style>
</head>
<body>
<div class="login-container">
    <h2>欢迎登录</h2>
    <form action="<%=request.getContextPath()%>/login" method="post">
        <label for="username">用户名:</label>
        <input type="text" id="username" name="username" required placeholder="请输入您的用户名">

        <label for="password">密码:</label>
        <input type="password" id="password" name="password" required placeholder="请输入您的密码">

        <input type="submit" value="登录">

        <div class="form-footer">
            没有账户？<a href="<%=request.getContextPath()%>/register.jsp">立即注册</a>
        </div>
    </form>
</div>
</body>
</html>